Feature/rdk 60236 structure#192
Conversation
|
@copilot |
Code Coverage Summary |
…ectly rrd_logproc_convert_issue_type() was converting '-' to '_', turning the suffix '_Search-67768-67' into '_SEARCH_67768_67'. This added extra '_' separators into the archive filename that broke the analytics portal's filename parser — it could no longer identify the timestamp field, so download requests used an incorrect S3 key. Fix: keep '-' as '-' in the sanitized output. The archive filename now uses '_' to separate structural fields (MAC, issueType, timestamp) and '-' within the UUID suffix, giving the portal a reliable delimiter. Also increase issue_type_sanitized buffer in uploadRRDLogs.c from 64 to 256 bytes so a full UUID suffix never causes a silent truncation failure. Before: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH_67768_67_<timestamp>_RRD_DEBUG_LOGS.tgz After: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH-67768-67_<timestamp>_RRD_DEBUG_LOGS.tgz All 331 tests pass. Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/981b6bc1-c9d2-4150-9e9d-851004942ffc Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
|
@copilot dont need to check for "_Search-"/"LogSearch-" these strings in the suffix add one check if the suffix length is more than 9 dont allow |
…9 rule
split_issue_type() now discards any suffix whose total length (including
the leading '_') exceeds 9 characters. The old _Search-/_LogSearch-
prefix validation is removed entirely.
Rule:
strlen(underscore) <= 9 → suffix accepted
strlen(underscore) > 9 → suffix discarded
This means:
- Short session tokens (e.g. "_ab12345", 8 chars) are carried through
- Long UUID-based suffixes like "_Search-b6877385-...) are discarded,
preventing extra '_' delimiters from breaking the portal filename parser
Affected tests updated:
- UnderscoreSplitsBaseAndSuffix : uses a short accepted suffix
- MultipleUnderscoresSplitsAtFirst: "_def_ghi" (8 chars) now kept
- BaseTruncatedWhenTooSmall / ExactFitBase: "_suffix" (7 chars) now kept
- SuffixTruncatedWhenTooSmall: uses 9-char suffix with 5-byte buffer
- OnlyUnderscoreInput: "_" (1 char) now kept
- LogSearchSuffixIsValid → NineCharSuffixIsAccepted (boundary test)
- SearchSuffixIsValid → LongSuffixIsDiscarded
- InvalidSuffixPrefixDiscarded / SearchWithoutHyphenIsInvalid /
LogSearchWithoutHyphenIsInvalid: updated comments (same outcomes)
- ProcessIssueTypeEvntTest comments updated to reflect new rule
All 331 tests pass.
Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448
Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
…tests
- Expand the RRD_MAX_SUFFIX_LEN comment to explain why 9 chars is the limit
- Rename misleading test names that referenced old prefix-based validation:
InvalidSuffixPrefixDiscarded → SuffixExceedingMaxLengthDiscarded
SearchWithoutHyphenIsInvalid → SuffixSeventeenCharsDiscarded
LogSearchWithoutHyphenIsInvalid → SuffixTwentyCharsDiscarded
- LongSuffixIsDiscarded: switch to a neutral _1234567890 example so the
test does not imply any Search-specific behavior
All 331 tests pass.
Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448
Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
Done in commits
(The 9-char limit includes the leading Long UUID suffixes like Tests updated: renamed the three old prefix-focused tests to |
Code Coverage Summary |
|
@copilot currently this is the format but if i have o place the suffix after the tme only ? |
The analytics portal parses archive filenames by splitting on '_'. When
the suffix was embedded in the issue-type field it shifted the timestamp
field position, causing "download failed" errors.
New format:
{MAC}_{BASE_ISSUE_TYPE}_{TIMESTAMP}_RRD_DEBUG_LOGS.tgz (no suffix)
{MAC}_{BASE_ISSUE_TYPE}_{TIMESTAMP}_{SUFFIX}_RRD_DEBUG_LOGS.tgz (with suffix)
Changes:
- rrdJsonParser.c: pass base and suffix separately to uploadDebugoutput
- rrdExecuteScript.h/c: add suffix param; forward through to orchestrator;
shell-script path appends suffix to issuename for backward compat
- rrd_upload.h / uploadRRDLogs.c: add suffix param; sanitize suffix
(strip leading '_', uppercase) separately from base issue type
- rrd_archive.h/c: add suffix param to generate_filename; append after
timestamp when non-empty
- Unit tests: update all call sites; add ArchiveFilenameGenerationWithSuffix,
ArchiveFilenameGenerationNullOrEmptySuffix, SuffixSanitizationUppercasesToken
All 334 tests pass.
Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/2074afbb-4992-454b-a62b-66eefcb3eb7e
Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
Done in commit Example: The suffix is threaded as a separate parameter through the call chain (
Done in commits
Long UUID-style suffixes like |
No description provided.